package online.lona.mc.bukkit.plugin.ymer.event;

import online.lona.mc.bukkit.plugin.ymer.Ymer;
import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
import org.bukkit.event.HandlerList;

public class YmerAuthFailedEvent extends YmerEvent implements Cancellable {
    private static HandlerList handlerList = new HandlerList();
    private final Player player;
    private boolean isCancelled;

    public YmerAuthFailedEvent(Ymer ymer, Player player) {
        super(ymer);
        this.player = player;
        isCancelled = false;
    }

    @Override
    public HandlerList getHandlers() {
        return handlerList;
    }

    @Override
    public boolean isCancelled() {
        return isCancelled;
    }

    @Override
    public void setCancelled(boolean b) {
        isCancelled = b;
    }

    public Player getPlayer() {
        return player;
    }
}
